<template>
    <div>
        详情
        {{detail.title}}
    </div>
</template>

<script>
export default {
    data(){
        return {
            detail:{}
        }
    },
    created(){
        //1.获取地址的id
        //2.请求详情
        let id = this.$route.params.id;
        console.log(id);
        this.$http.get('/api/detail',{params:{id}}).then(res => {
            this.detail = res.data.data;
        })
    }
}
</script>